Fix a flaky tests on Windows
authorAlex Crichton <alex@alexcrichton.com>
Tue, 4 Aug 2015 03:46:24 +0000 (20:46 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 4 Aug 2015 03:46:24 +0000 (20:46 -0700)
Windows doesn't like us deleting files right after running a process that works
on them, so be sure to call `cargo` instead of `cargo_process`.

tests/test_cargo_test.rs

index 9f8a43ff1a746bb2d8e48e5b5375b21d21801061..52860ec6c3a49e231ea48feed2cfb07ec2a5bc71 100644 (file)
@@ -495,10 +495,9 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
                        doctest = DOCTEST,
                        dir = p.url())));
 
-    assert_that(p.cargo_process("test").arg("foo"),
+    assert_that(p.cargo("test").arg("foo"),
                 execs().with_status(0)
                        .with_stdout(&format!("\
-{compiling} foo v0.0.1 ({dir})
 {running} target[..]foo-[..]
 
 running 1 test
@@ -513,9 +512,8 @@ running 0 tests
 test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 
 ",
-                       compiling = COMPILING, running = RUNNING,
-                       doctest = DOCTEST,
-                       dir = p.url())));
+                       running = RUNNING,
+                       doctest = DOCTEST)));
 });
 
 // Regression test for running cargo-test twice with